package com.cf.user.permission.model;

import com.cf.crud.entity.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;


@Entity
@Table(name = "userWithRole", uniqueConstraints = {
        @UniqueConstraint(columnNames = {"userId", "roleId"})
})
public class UserWithRole extends BaseEntity {

    @Column(name = "userId")
    private long userId;

    @Column(name = "roleId")
    private long roleId;

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public long getRoleId() {
        return roleId;
    }

    public void setRoleId(long roleId) {
        this.roleId = roleId;
    }
}
